package com.ltt.mapper;

import com.ltt.dao.pojo.Back;
import com.ltt.dao.vo.Result;
import com.ltt.dao.vo.params.FeedBackParams;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author ‘李天泰’
 * @version 1.0
 * @description: TODO
 * @date 2023/5/10 14:56
 */
@Mapper
public interface FeedBackMapper {
    @Insert("insert into feedback(openid,content) values(#{openid},#{content})")
    void insertFeedBack(FeedBackParams feedBackParams);


    @Select("select * from feedback where is_read = #{isRead}")
    List<Back> getAll(int isRead);

    @Update("update feedback set is_read = 1 where id = #{id}")
    void del(int id);

    @Select("select * from feedback where is_read = #{arg1} and openid = #{arg0}")
    List<Back> gets(String openId,int isRead);

}
